package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AlpStageBudgetMapper;
import com.ruoyi.system.domain.AlpStageBudget;
import com.ruoyi.system.service.IAlpStageBudgetService;
import com.ruoyi.common.core.text.Convert;

/**
 * 预算收款Service业务层处理
 * 
 * @author zhangjun
 * @date 2020-02-15
 */
@Service
public class AlpStageBudgetServiceImpl implements IAlpStageBudgetService 
{
    @Autowired
    private AlpStageBudgetMapper alpStageBudgetMapper;

    /**
     * 查询预算收款
     * 
     * @param id 预算收款ID
     * @return 预算收款
     */
    @Override
    public AlpStageBudget selectAlpStageBudgetById(Long id)
    {
        return alpStageBudgetMapper.selectAlpStageBudgetById(id);
    }

    /**
     * 查询预算收款
     *
     * @param stageId 阶段ID
     * @return 预算收款
     */
    @Override
    public List<AlpStageBudget> selectAlpStageBudgetByStageId(Long stageId)
    {
        return alpStageBudgetMapper.selectAlpStageBudgetByStageId(stageId);
    }

    /**
     * 查询预算收款列表
     * 
     * @param alpStageBudget 预算收款
     * @return 预算收款
     */
    @Override
    public List<AlpStageBudget> selectAlpStageBudgetList(AlpStageBudget alpStageBudget)
    {
        return alpStageBudgetMapper.selectAlpStageBudgetList(alpStageBudget);
    }

    /**
     * 新增预算收款
     * 
     * @param alpStageBudget 预算收款
     * @return 结果
     */
    @Override
    public int insertAlpStageBudget(AlpStageBudget alpStageBudget)
    {
        return alpStageBudgetMapper.insertAlpStageBudget(alpStageBudget);
    }

    /**
     * 修改预算收款
     * 
     * @param alpStageBudget 预算收款
     * @return 结果
     */
    @Override
    public int updateAlpStageBudget(AlpStageBudget alpStageBudget)
    {
        return alpStageBudgetMapper.updateAlpStageBudget(alpStageBudget);
    }

    /**
     * 删除预算收款对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAlpStageBudgetByIds(String ids)
    {
        return alpStageBudgetMapper.deleteAlpStageBudgetByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除预算收款信息
     * 
     * @param id 预算收款ID
     * @return 结果
     */
    @Override
    public int deleteAlpStageBudgetById(Long id)
    {
        return alpStageBudgetMapper.deleteAlpStageBudgetById(id);
    }
}
